package com.group.aop;


import com.group.common.utils.R;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;


@Aspect
@Component
public class MyAop {

    @Pointcut(value = "@annotation(com.group.aop.ExceptionLogin)")
    private void pointCut(){
    };

    @AfterReturning(value = "pointCut()")
    public R ee(JoinPoint joinPoint){

        return null;
    }

    @Before(value = "pointCut()")
    public ClassCastException ee1(JoinPoint joinPoint){
        joinPoint.getSignature();

        return new ClassCastException();
    }
}
